Name :Take the absolute value
Symbol :ABS
Illustrate:
The function of this type of module is to calculate the absolute value of the input value, and the result is assigned to the output OUT.
Image:
Parameter:
| Parameter | Statement | Type | Description |
|---|---|---|---|
| IN | Input | INT/SINT/DINT/REAL | Enter a value |
| OUT | Output | INT/SINT/DINT/REAL | Output value |
Example:
LD:
ST:
Interpretation:
| parameter | operand | value |
|---|---|---|
| IN | TagIn | Enter a value:-5 |
| OUT | TagOut | Output value:5 |
IN inputs the corresponding type of data, and OUT outputs the absolute value of IN.